\subsection{Homotopy relative to a set}
\begin{definition}
	Let \( A \subseteq X \).
	We say \( f_0, f_1 \colon X \to Y \) are \emph{homotopic relative to \( A \)}, written \( f_0 \sim f_1 \text{ rel } A \), if \( f_0 \sim f_1 \) via some homotopy \( H \colon X \times I \to Y \) that fixes \( A \), so \( H(a,t) = f_0(a) = f_1(a) \) for all \( a \in A \).
\end{definition}
\begin{lemma}
	Homotopy relative to \( A \) is an equivalence relation.
\end{lemma}
\begin{lemma}
	If \( f_0, f_1 \colon X \to Y \) and \( f_0 \sim f_1 \text{ rel } A \), and \( g_0, g_1 \colon Y \to Z \) and \( g_0 \sim g_1 \text{ rel } f(A) \), then \( g_0 \circ f_0 \sim g_1 \circ f_1 \text{ rel } A \).
\end{lemma}
If \( \gamma_0, \gamma_1 \colon I \to X \) are two homotopic paths relative to their endpoints, so \( \gamma_0 \sim \gamma_1 \text{ rel } \qty{0,1} \), we write \( \gamma_0 \sim_e \gamma_1 \).
\begin{lemma}
	Let \( f_0, f_1 \colon I \to I \), where \( f_0(0) = f_1(0) \) and \( f_0(1) = f_1(1) \).
	Then \( f_0 \sim_e f_1 \).
\end{lemma}
\begin{proof}
	\( I \) is convex, hence \( H(x,t) = (1-t)f_0(x) + tf_1(x) \) is a homotopy that preserves endpoints as required.
\end{proof}
\begin{corollary}
	Suppose \( f \colon I \to I \), \( \gamma \colon I \to X \).
	Then if \( f(0) = 0 \) and \( f(1) = 1 \), \( \gamma \circ f \sim_e \gamma \).
	Further, if \( f(0) = 0 \) and \( f(1) = 0 \), we have \( \gamma \circ f \sim_e c_{I,\gamma(0)} \).
\end{corollary}
\begin{proof}
	We have \( f(0) = \mathrm{id}_I(0) \) and \( f(1) = \mathrm{id}_I(1) \).
	Hence \( f \sim_e \mathrm{id}_I \).
	Therefore, \( \gamma \circ f \sim_e \gamma \circ \mathrm{id}_I = \gamma \).

	For the second claim, \( f(0) = c_{I,0}(0) \) and \( f(1) = c_{I,0}(1) \), hence \( f \sim_e c_{I,0} \) giving \( \gamma \circ f \sim_e \gamma \circ c_{I,0} = c_{I,\gamma(0)} \).
\end{proof}
\begin{definition}
	Let \( X \) be a space, and \( p, q \in X \).
	Let
	\[ \Omega(X,p,q) = \qty{\gamma \colon I \to X \mid \gamma \text{ continuous}, \gamma(0) = p, \gamma(1) = q} \]
	be the set of paths from \( p \) to \( q \).
	Let \( \Omega(X,p) = \Omega(X,p,p) \) be the set of loops based at \( p \).
\end{definition}
\begin{definition}
	Let \( \gamma \in \Omega(X,p,q), \gamma' \in \Omega(X,q,r) \).
	Then their composition \( \gamma \gamma' \in \Omega(X,p,r) \) is given by
	\[ (\gamma\gamma')(t) = \begin{cases}
		\gamma(2t) & t \in \qty[0,\frac 12] \\
		\gamma'(2t-1) & t \in \qty[\frac 12, 1]
	\end{cases} \]
	\( \gamma\gamma' \) is continuous by the gluing lemma.
\end{definition}
\begin{lemma}
	Let \( \gamma_0, \gamma_1 \in \Omega(X,p,q) \) and \( \gamma_0', \gamma_1' \in \Omega(X,q,r) \) such that \( \gamma_0 \sim_e \gamma_1 \) via \( H \colon I \times I \to X \) and \( \gamma_0' \sim_e \gamma_1' \) via \( H' \colon I \times I \to X \).
	Then \( \gamma_0 \gamma_0' \sim_e \gamma_1 \gamma_1' \).
\end{lemma}
\begin{proof}
	The homotopy required is
	\[ \overline H(x,t) = \begin{cases}
		H(2x,t) & x \in \qty[0,\frac 12] \\
		H'(2x-1,t) & x \in \qty[\frac 12, 1]
	\end{cases} \]
\end{proof}
\begin{definition}
	Let \( \gamma \in \Omega(X,p,q) \).
	Then \( \gamma^{-1} \in \Omega(X,q,p) \) is the \emph{reverse} of \( \gamma \), given by
	\[ \gamma^{-1}(t) = \gamma(1-t) \]
\end{definition}
\begin{proposition}
	\begin{enumerate}
		\item Let \( \gamma \in \Omega(X,p,q) \).
			Then \( c_{I,p} \gamma \sim_e \gamma \sim_e \gamma c_{I,q} \).
		\item \( \gamma \gamma^{-1} \sim_e c_{I,p} \) and \( \gamma^{-1} \gamma \sim_e c_{I,q} \).
		\item If \( \gamma(1) = \gamma'(0) \) and \( \gamma'(1) = \gamma''(0) \), we have
			\[ \gamma (\gamma' \gamma'') \sim_e (\gamma \gamma') \gamma'' \]
	\end{enumerate}
\end{proposition}
\begin{proof}
	\begin{enumerate}
		\item The composition \( c_{I,p} \gamma \) has \( c_{I,p} \gamma (t) = \gamma(f(t)) \) where \( f \colon I \to I \) defined by
			\[ f(t) = \begin{cases}
				0 & t \in \qty[0,\frac 12] \\
				2t - 1 & t \in \qty[\frac 12, 1]
			\end{cases} \]
			Since \( f(0) = 0 \) and \( f(1) = 1 \), \( \gamma \circ f \sim_e \gamma \).
			Similarly, \( \gamma c_{I,q} (t) = \gamma(g(t)) \) where
			\[ g(t) = \begin{cases}
				2t & t \in \qty[0,\frac 12] \\
				1 & t \in \qty[\frac 12, 1]
			\end{cases} \]
		\item \( \gamma\gamma^{-1}(t) = \gamma(f(t)) \) where
			\[ f(t) = \begin{cases}
				2t & t \in \qty[0,\frac 12] \\
				1 - 2t & t \in \qty[\frac 12, 1]
			\end{cases} \]
			Further, \( \gamma^{-1}\gamma(t) = \gamma(g(t)) \) where
			\[ g(t) = \begin{cases}
				1 - 2t & t \in \qty[0,\frac 12] \\
				2t - 1 & t \in \qty[\frac 12, 1]
			\end{cases} \]
		\item We can write \( \gamma(\gamma'\gamma'')(t) = (\gamma\gamma')\gamma(f(t)) \) where \( f \colon I \to I \) is the continuous function defined by
			\[ f(t) = \begin{cases}
				\frac t2 & t \in \qty[0,\frac 12] \\
				t - \frac 14 & t \in \qty[\frac 12, \frac 34] \\
				2t - 1 & t \in \qty[\frac 34, 1]
			\end{cases} \]
			noting that \( f(0) = 0 \) and \( f(1) = 1 \).
			Hence \( \gamma(\gamma'\gamma'') \sim_e = (\gamma\gamma')\gamma'' \).
	\end{enumerate}
\end{proof}
\begin{definition}
	Let \( X \) be a space and \( x_0 \in X \).
	We define the \emph{fundamental group} or \emph{first homotopy group} of \( X \) based at \( x_0 \) by
	\[ \pi_1(X,x_0) = \faktor{\Omega(X,x_0)}{\sim_e} \]
	We say \( x_0 \) is the \emph{basepoint}.
	If \( \gamma \in \Omega(X,x_0) \), we write \( [\gamma] \) for its image in \( \pi_1(X,x_0) \), its equivalence class.
\end{definition}
\begin{theorem}
	We define multiplication in \( \pi_1 \) by \( [\gamma] \ast [\gamma'] = [\gamma \gamma'] \).
	The identity is \( 1 = [c_{I,x_0}] \).
	The inverse is given by \( [\gamma]^{-1} = [\gamma^{-1}] \).
	These operations form a group.
\end{theorem}
\begin{proof}
	Using the above lemma we explicitly check the group axioms.
	Identity:
	\[ 1 [\gamma] = [c_{I,x_0}\gamma] = [\gamma];\quad [\gamma] 1 = [\gamma c_{I,x_0}] = [\gamma] \]
	Inverses:
	\[ [\gamma] [\gamma]^{-1} = [\gamma \gamma^{-1}] = [c_{I,x_0}] = 1 \]
	Associativity:
	\[ ([\gamma][\gamma'])[\gamma''] = [\gamma\gamma'][\gamma''] = [(\gamma\gamma')\gamma''] = [\gamma(\gamma'\gamma'')] = [\gamma][\gamma'\gamma''] = [\gamma]([\gamma'][\gamma'']) \]
\end{proof}

\subsection{Induced maps}
\begin{definition}
	Let \( f \colon X \to Y \) be a continuous map, and \( f(x_0) = y_0 \).
	Then we have a map \( \Omega(X,x_0) \to \Omega(Y,y_0) \) defined by \( \gamma \mapsto f \circ \gamma \).
	Note that if \( \gamma_0 \sim_e \gamma_1 \), we have \( f \circ \gamma_0 \sim_e f \circ \gamma_1 \).
	Thus, this map descends to the \emph{induced homomorphism} \( f_\star \colon \pi_1(X, x_0) \to \pi_1(Y,y_0) \) defined by \( [\gamma] \mapsto [f \circ \gamma] \).
\end{definition}
\begin{definition}
	A \emph{pointed space} \( (X, x_0) \) is a pair where \( X \) is a space and \( x_0 \in X \).
	We write \( f \colon (X, x_0) \to (Y, y_0) \) to denote a map \( f \colon X \to Y \) where \( f(x_0) = y_0 \).
	In particular, for \( f \colon (X,x_0) \to (Y,y_0) \) there is an induced map \( f_\star \colon \pi_1(X,x_0) \to \pi_1(Y,y_0) \).
\end{definition}
\begin{proposition}
	Let \( f \colon (X, x_0) \to (Y, y_0) \).
	Then,
	\begin{enumerate}
		\item The induced map \( f_\star \colon \pi_1(X, x_0) \to \pi_1(Y, y_0) \) is a group homomorphism.
		\item \( \qty(\mathrm{id}_{(X, x_0)})_\star = \mathrm{id}_{\pi_1(X,x_0)} \).
		\item If \( g \colon (Y, y_0) \to (Z, z_0) \), we have \( (g \circ f)_\star = g_\star \circ f_\star \).
		\item If \( f_0, f_1 \colon (X, x_0) \to (Y, y_0) \) with \( f_0 \sim f_1 \text{ rel } x_0 \), then \( (f_0)_\star = (f_1)_\star \) (\emph{homotopy invariance}).
	\end{enumerate}
\end{proposition}
\begin{remark}
	The action of taking the fundamental group of a pointed space thus yields a functor \( \pi_1 \colon \mathbfup{Top}_\bullet \to \mathbfup{Grp} \).
	The following diagram, representing part (iii) of the proposition above, commutes.
	\begin{center}
		\begin{tikzcd}
			{\pi_1(X,x_0)} \arrow[rr, "(g \circ f)_\star"] \arrow[rd, "f_\star"]  &                                             & {\pi_1(Z,z_0)}                \\
																				  & {\pi_1(Y,y_0)} \arrow[ru, "g_\star"]        &                               \\
																				  & {(Y,y_0)} \arrow[rd, "g"] \arrow[u, dashed] &                               \\
			{(X,x_0)} \arrow[ru, "f"] \arrow[rr, "g \circ f"] \arrow[uuu, dashed] &                                             & {(Z,z_0)} \arrow[uuu, dashed]
		\end{tikzcd}
	\end{center}
\end{remark}
\begin{proof}
	\begin{enumerate}
		\item This follows from the fact that
			\[ f \circ (\gamma\gamma')(t) = \begin{cases}
				f \circ \gamma(2t) & t \in \qty[0,\frac 12] \\
				f \circ \gamma'(2t-1) & t \in \qty[\frac 12, 1]
			\end{cases} = (f \circ \gamma)(f \circ \gamma')(t) \]
			Hence,
			\[ f_\star([\gamma][\gamma']) = [f\circ(\gamma\gamma')] = [(f\circ \gamma)(f \circ \gamma')] = [f \circ \gamma][f \circ \gamma'] = f_\star([\gamma]) f_\star([\gamma']) \]
		\item \( \mathrm{id}_\star([\gamma]) = [\mathrm{id}_X\circ \gamma] = [\gamma] \).
		\item \( (f \circ g)_\star([\gamma]) = [f \circ g \circ \gamma] = f_\star([g \circ \gamma]) = f_\star(g_\star([\gamma])) \).
		\item \( f_0 \sim f_1 \text{ rel } x_0 \) and \( \gamma(0) = \gamma(1) = x_0 \) implies \( f_0 \circ \gamma \sim_e f_1 \circ \gamma \), so \( (f_0)_\star([\gamma]) = (f_1)_\star([\gamma]) \).
	\end{enumerate}
\end{proof}
\begin{example}
	Let \( f \colon X \to Y \) be a homeomorphism, and let \( y_0 = f(x_0) \).
	Then \( f \colon (X, x_0) \to (Y, y_0) \) and \( f^{-1} \colon (Y, y_0) \to (X, x_0) \) are inverses.
	Thus, \( f_\star \colon \pi_1(X, x_0) \to \pi_1(Y, y_0) \) and \( f^{-1}_\star \colon \pi_1(Y, y_0) \to \pi_1(X, x_0) \) are inverses.
	Since \( f_\star \circ f^{-1}_\star = (f \circ f^{-1})_\star = \mathrm{id}_{\pi_1(Y,y_0)} \) and \( f^{-1}_\star \circ f_\star = \mathrm{id}_{\pi_1(X,x_0)} \), we have that \( f_\star \) is a group isomorphism, and \( \pi_1 \) is a topological invariant.
\end{example}

\subsection{Retractions}
\begin{definition}
	Let \( A \subset X \), where \( \iota \colon A \to X \) is the inclusion map.
	Then \( p \colon X \to A \) is a \emph{retraction} if \( p \circ \iota = \mathrm{id}_A \).
	\( p \colon X \to A \) is a \emph{strong deformation retraction}, or \emph{s.d.r.}, if \( p \circ \iota = \mathrm{id}_A \) and \( \iota \circ p \sim \mathrm{id}_X \text{ rel } A \).
\end{definition}
\begin{remark}
	In either case, if \( a_0 \in A \), \( \iota \colon (A, a_0) \to (X, a_0) \) and \( p \colon (X, a_0) \to (A, a_0) \).
	If \( p \) is a retraction, \( p_\star \circ \iota_\star = (p \circ \iota)_\star = (\mathrm{id}_A)_\star = \mathrm{id}_{\pi_1(A,a_0)} \), so \( \iota_\star \colon \pi_1(A, a_0) \to \pi_1(X, a_0) \) is injective, and \( p_\star \colon \pi_1(X, a_0) \to \pi_1(A, a_0) \) is surjective.
	If \( p \) is a strong deformation retraction, \( \iota_\star \circ p_\star = (\iota \circ p)_\star = (\mathrm{id}_X)_\star = \mathrm{id}_{\pi_1(X,a_0)} \), so \( p_\star \) and \( \iota_\star \) are isomorphisms.
\end{remark}
\begin{remark}
	If \( p \colon X \to A \) is a strong deformation retraction, then \( A \sim X \).
\end{remark}
\begin{example}
	\( p \colon \mathbb R^{n+1} \setminus \qty{0} \to S^n \) given by \( v \mapsto \frac{v}{\norm{v}} \) is a strong deformation retraction.
\end{example}
\begin{example}
	\( \mathbb R^2 \setminus \qty{0,1} \) has \( A, B \) as strong deformation retractions, where \( A \) is a figure-eight with one loop surrounding each hole, and \( B \) is a rectangle surrounding each hole with a vertical line connecting the top and bottom edges through \( \qty(\frac 12, 0) \).
	This can be a useful trick to show \( A \sim B \).
\end{example}

\subsection{Null-homotopy and extensions}
\begin{definition}
	We say \( f \colon X \to Y \) is \emph{null-homotopic} if \( f \sim c_{X,p} \) for \( p \in Y \).
\end{definition}
\begin{example}
	If \( X \) is contractible, then \( \mathrm{id}_X \sim c_{X,q} \), so \( f = f \circ \mathrm{id}_X \sim f \circ c_{X,q} = f(q) \).
	So any \( f \colon X \to Y \) is null-homotopic.
	If \( f_0 \sim f_1 \), then \( f_0 \) is null-homotopic if and only if \( f_1 \) is null-homotopic.
\end{example}
\begin{definition}
	Let \( A \subset X \) and \( f \colon A \to Y \).
	We say a continuous map \( F \colon X \to Y \) is an \emph{extension} of \( f \) if \( \eval{F}_A = f \).
	If such a map exists, we say \( f \) \emph{extends} to \( X \).
	\begin{center}
		\begin{tikzcd}
			& X \arrow[d, "F", dashed] \\
			A \arrow[ru, "\iota"] \arrow[r, "f"'] & Y
		\end{tikzcd}
	\end{center}
\end{definition}
\begin{lemma}
	\( f \colon S^1 \to Y \) extends to \( D^2 \) if and only if \( f \) is null-homotopic.
\end{lemma}
\begin{proof}
	If \( F \) is an extension of \( f \) to \( D^2 \), we define \( H(v,t) = F(tv) \).
	Then \( H \) is a homotopy from \( f \) to \( c_{S^1, F(0)} \).
	So \( f \) is null-homotopic.

	Conversely, if \( f \) is null-homotopic, let \( H \colon S^1 \times I \to Y \) be a homotopy for \( c_{S^1, p} \sim f \).
	Then we define
	\[ F(v) = \begin{cases}
		H\qty(\frac{v}{\norm{v}}, \norm{v}) & v \neq 0 \\
		p & v = 0
	\end{cases} \]
	One can check that this is indeed a continuous extension.
\end{proof}
\begin{definition}
	Let \( \gamma \in \Omega(X,x_0) \).
	We define \( \overline \gamma \colon S^1 \to X \) by \( \overline\gamma(e^{2\pi i t}) = \gamma(t) \).
	This is well-defined since \( \gamma(0) = \gamma(1) \), and it is continuous because \( \faktor{I}{\qty{0,1}} \simeq S^1 \).
\end{definition}
\begin{lemma}
	\begin{enumerate}
		\item If \( \gamma_0 \sim_e \gamma_1 \) via \( H(x,t) \), we have \( \overline \gamma_0 \sim \overline \gamma_1 \) via \( \overline H \colon S^1 \times I \to Y \) given by \( \overline H(e^{2\pi i x}, t) = H(x,t) \).
		\item \( \overline{\gamma \gamma'} \sim \overline{\gamma'\gamma} \).
	\end{enumerate}
\end{lemma}
\begin{proof}
	\begin{enumerate}
		\item Note that \( \overline H \) is well-defined since \( H(0,t) = H(1,t) = x_0 \).
		\item We have \( \overline{\gamma\gamma'}(v) = \overline{\gamma'\gamma}(-v) \), hence \( \overline{\gamma\gamma'} = \overline{\gamma'\gamma} \circ a \) where \( a \colon S^1 \to S^1 \) is the antipodal map.
			Since \( a \sim \mathrm{id}_{S^1} \), we have \( \overline{\gamma\gamma'} \sim \overline{\gamma'\gamma} \).
	\end{enumerate}
\end{proof}
Consider the radial projection homeomorphism \( \Phi \colon D^2 \to I \times I \).
Note that \( \Phi(S^1) = \partial (I \times I) = I \times \qty{0,1} \cup \qty{0,1} \times I \).
Since \( \Phi \) is a homeomorphism, \( h \colon \partial (I \times I) \to X \) extends to \( I \times I \) if and only if \( h \circ \Phi \) extends to \( D^2 \), which is true if and only if \( h \circ \Phi \) is null-homotopic.
Define \( \alpha_i(t) = h(t,i) \) and \( \beta_i(t) = h(i,t) \) for \( i = 0,1 \).
Then, \( h \circ \Phi \sim \overline{\alpha_0\beta_1\alpha_1^{-1}\beta_0^{-1}} \).
\begin{proposition}
	Let \( \gamma_0, \gamma_1 \in \Omega(X,p,q) \).
	Then the following are equivalent.
	\begin{enumerate}
		\item \( \gamma_0 \sim_e \gamma_1 \);
		\item \( \overline{\gamma_0\gamma_1^{-1}} \) is null-homotopic;
		\item \( [\gamma_0\gamma_1^{-1}] = 1 \) in \( \pi_1(X,p) \).
	\end{enumerate}
\end{proposition}
\begin{proof}
	Consider \( h \colon \partial (I \times I) \to X \) given by \( \gamma_0 c_{I,q} \gamma_1^{-1} c_{I,p} \).
	Note that \( h \) is continuous by the gluing lemma.
	\( \gamma_0 \sim_e \gamma_1 \) if and only if \( h \) extends to \( I \times I \), which is true if and only if \( h \circ \Phi \) extends to \( D^2 \), if and only if \( \overline{\gamma_0 c_{I,q} \gamma_1^{-1} c_{I,p}} \) is null-homotopic.
	But this is homotopic to \( \overline{\gamma_0\gamma^{-1}} \), so this proves that (i) and (ii) are equivalent.

	Now, consider \( h' \colon \partial (I \times I) \to X \) given by \( \gamma_0 \gamma_1^{-1} \) on one side, and on all other sides, \( c_{I,p} \).
	Then \( [\gamma_0\gamma_1^{-1}] = 1 \) if and only if \( \gamma_0 \gamma_1^{-1} \sim_e c_{I,p} \), if and only if \( h' \) extends to \( I \times I \), if and only if \( h \circ \Phi \) extends to \( D^2 \), if and only if \( \overline{\gamma_0\gamma_1^{-1} c_{I,p} c_{I,p}^{-1} c_{I,p}^{-1}} \sim \overline{\gamma_0\gamma_1^{-1}} \) is null-homotopic.
\end{proof}
\begin{corollary}
	The following are equivalent.
	\begin{enumerate}
		\item \( \gamma_0 \sim_e \gamma_1 \) for all \( \gamma_0, \gamma_1 \in \Omega(X,p,q) \) and all \( p,q \in X \).
		\item any \( f \colon S^1 \to X \) is null-homotopic;

		\item \( \pi_1(X,x_0) \) is the trivial group for all \( x_0 \in X \).
	\end{enumerate}
\end{corollary}
\begin{definition}
	\( X \) is \emph{simply connected} if \( X \) is path-connected and \( \pi_1(X,x_0) = 1 \) for all \( x_0 \in X \).
\end{definition}

\subsection{Change of basepoint}
\begin{lemma}
	Let \( X_0 \) be the path-connected component of \( X \) containing a point \( x_0 \in X \).
	If \( Z \) is path-connected, \( f \colon Z \to X \) is continuous, and \( x_0 \in \Im f \), we have \( \Im f \subseteq X_0 \).
\end{lemma}
\begin{proof}
	Suppose \( f(z_0) = x_0 \).
	Given \( z \in Z \), choose \( \gamma \in \Omega(Z,z_0,z) \) by path-connectedness.
	Then \( f \circ \gamma \in \Omega(X,x_0,f(z)) \), so \( f(Z) \subseteq X_0 \).
\end{proof}
Let \( \iota \colon (X_0,x_0) \to (X,x_0) \) be the inclusion map.
Then if \( f \colon (Z,z_0) \to (X,x_0) \) and \( Z \) is path-connected, \( f \) factors through \( \iota \) as \( f = \iota \circ \hat f \) where \( \hat f \colon (Z,z_0) \to (X_0,x_0) \).
\begin{lemma}
	The map \( \iota_\star \colon \pi_1(X_0,x_0) \to \pi_1(X,x_0) \) is an isomorphism.
\end{lemma}
\begin{proof}
	Let \( [\gamma] \in \pi_1(X,x_0) \), so \( \gamma \colon (I,0) \to (X,x_0) \) giving \( \gamma = \iota \circ \hat\gamma \) where \( \hat\gamma \in \Omega(X_0,x_0) \); \( [\gamma] = \iota_\star([\hat\gamma]) \), so \( \iota_\star \) is surjective.
	Now suppose \( \gamma_0 = \iota \circ \hat \gamma_0, \gamma_1 = \iota \circ \hat \gamma_1 \).
	If \( \iota_\star([\hat\gamma_0]) = \iota_\star([\hat\gamma_1]) \), so \( \gamma_0 \sim_e \gamma_1 \) via \( H \colon I \times I \to X \), we have \( H(0,0) = x_0 \), so \( H = \iota \circ \hat H \) since \( I \times I \) is path-connected.
	Then we can check \( \hat H \) is a homotopy for \( \hat \gamma_0 \sim_e \hat \gamma_1 \).
	Hence \( [\hat\gamma_0] = [\hat\gamma_1] \), so \( \iota_\star \) is injective.
\end{proof}
Let \( u \in \Omega(X,x_0,x_1) \).
Then we can define \( u_\sharp \colon \Omega(X,x_0) \to \Omega(X,x_1) \) by \( \gamma \mapsto u^{-1}\gamma u \).
Hence if \( \gamma_0 \sim_e \gamma_1 \), we have \( u^{-1}\gamma_0 u \sim_e u^{-1} \gamma_1 u \), so \( u_\sharp \) descends to a map \( u_\sharp \colon \pi_1(X,x_0) \to \pi_1(X,x_1) \) defined by \( [\gamma] \mapsto [u^{-1}\gamma u] \).
\begin{proposition}
	\( u_\sharp \) is a group isomorphism with inverse \( (u^{-1})_\sharp \).
	\begin{center}
		\begin{tikzcd}
			{\pi_1(X,x_0)} \arrow[r, "u_\sharp", shift left] & {\pi_1(X,x_1)} \arrow[l, "(u^{-1})_\sharp", shift left]
		\end{tikzcd}
	\end{center}
\end{proposition}
\begin{proof}
	First, it is a homomorphism.
	\begin{align*}
		u_\sharp([\gamma][\gamma']) &= [u^{-1}\gamma \gamma' u] = [u^{-1}\gamma c_{I,x_0}\gamma' u] \\
		&= [u^{-1}\gamma u u^{-1} \gamma' u] = [u^{-1}\gamma u][u^{-1}\gamma' u] = u_\sharp([\gamma])u_\sharp([\gamma'])
	\end{align*}
	Consider the function \( u^{-1}_\sharp \).
	We have
	\[ u^{-1}_\sharp(u_\sharp([\gamma])) = [uu^{-1}\gamma uu^{-1}] = [c_{I,x_0} \gamma c_{I,x_0}] = [\gamma] \]
	and
	\[ u_\sharp(u^{-1}_\sharp([\gamma])) = [u^{-1}u\gamma u^{-1}u] = [c_{I,x_1} \gamma c_{I,x_1}] = [\gamma] \]
	So \( u_\sharp, u^{-1}_\sharp \) are inverses, and therefore isomorphisms.
\end{proof}
\begin{corollary}
	A space \( X \) is simply connected if it is path-connected and \( \pi_1(X,x_0) = 1 \) for any \( x_0 \in X \), since then it follows that \( \pi_1(X,x) = 1 \) for all \( x \in X \).
\end{corollary}
\begin{theorem}
	Let \( x_0 \in X \), and \( f_0, f_1 \colon X \to Y \) such that \( f_0 \sim f_1 \) by \( H \colon X \times I \to Y \).
	Let \( u(t) = H(x_0,t) \) and \( y_0 = f_0(x_0), y_1 = f_1(x_0) \).
	Then \( u \in \Omega(Y,y_0,y_1) \).
	We have \( f_i \colon (X,x_0) \to (Y,y_i) \) which induce \( f_{i\star} \colon \pi_1(X,x_0) \to \pi_1(Y,y_i) \).
	Then \( f_{1\star} = u_\sharp \circ f_{0\star} \).
	\begin{center}
		\begin{tikzcd}
			& {(Y,y_0)} &  &                                                                  & {\pi_1(Y,y_0)} \arrow[dd, "u_\sharp"] \\
			{(X,x_0)} \arrow[ru, "f_0"] \arrow[rd, "f_1"'] &           &  & {\pi_1(X,x_0)} \arrow[rd, "f_{1\star}"] \arrow[ru, "f_{0\star}"] &                                       \\
			& {(Y,y_1)} &  &                                                                  & {\pi_1(Y,y_1)}
		\end{tikzcd}
	\end{center}
\end{theorem}
\begin{proof}
	We must show that \( f_{1\star}([\gamma]) = u_\sharp(f_{0\star}([\gamma])) \).
	Let \( \gamma_i = f_i \circ \gamma \).
	We therefore need to show \( \gamma_1 \sim_e u^{-1} \gamma_0 u \) for all \( \gamma \in \Omega(X,x_0) \).
	Suppose we can show that \( H \colon \partial (I \times I) \to Y \) given by \( \gamma_0, u, \gamma_1^{-1}, u^{-1} \) on each side of the square extends to \( I \times I \).
	Equivalently, \( \overline{\gamma_0 u \gamma_1^{-1} u^{-1}} = \overline{u^{-1}\gamma_0 u \gamma_1^{-1}} \) is null-homotopic.
	This is equivalent to the statement \( u^{-1}\gamma_0 u \sim_e \gamma_1 \).
	We know \( h \) extends to \( \hat H \colon I \times I \to Y \), because \( \hat H(x,t) = H(\gamma(x),t) \).
\end{proof}
\begin{corollary}
	Let \( X \sim Y \) via \( f : X \to Y \) and \( g \colon Y \to X \), so \( f \circ g \sim \mathrm{id}_Y \) and \( g \circ f \sim \mathrm{id}_X \).
	Let \( x_0 \in X \) and \( f(x_0) = y_0 \).
	Let \( g(y_0) = x_1 \) and \( f(x_1) = y_1 \).
	Then we have induced maps \( f^{(0)}_\star \colon \pi_1(X,x_0) \to \pi_1(Y,y_0) \), \( g_\star \colon \pi_1(Y,y_0) \to \pi_1(X,x_1) \), \( f^{(1)}_\star \colon \pi_1(X,x_1) \to \pi_1(Y,y_1) \).
	Then \( g_\star \) is an isomorphism.
	\begin{center}
		\begin{tikzcd}
			{(X,x_0)} \arrow[rd, "f"] \arrow[dd, "g \circ f \sim \mathrm{id}_X"', dashed] &                                                                              &  & {\pi_1(X,x_0)} \arrow[rd, "f_\star^{(0)}"] \arrow[dd, "u_\sharp"'] &                                                             \\
																						  & {(Y,y_0)} \arrow[ld, "g"] \arrow[dd, "f \circ g \sim \mathrm{id}_Y", dashed] &  &                                                                    & {\pi_1(Y,y_0)} \arrow[ld, "g_\star"] \arrow[dd, "u_\sharp"] \\
			{(X,x_1)} \arrow[rd, "f"]                                                     &                                                                              &  & {\pi_1(X,x_1)} \arrow[rd, "f_\star^{(1)}"]                         &                                                             \\
																						  & {(Y,y_1)}                                                                    &  &                                                                    & {\pi_1(Y,y_1)}
		\end{tikzcd}
	\end{center}
	The left-hand commutative diagram, in the category of pointed topological spaces, commutes up to homotopy.
	The right-hand induced diagram commutes.
\end{corollary}
\begin{proof}
	We have \( \mathrm{id}_X \sim g \circ f \) via \( H \colon X \times I \to X \).
	Then \( g_\star \circ f^{(0)}_\star = (g \circ f)_\star = u_\sharp \circ (\mathrm{id}_X)_\star \) where \( u(t) = H(x_0,t) \) is a path from \( x_0 \) to \( x_1 \).
	Since \( u_\sharp \) is an isomorphism, \( g_\star \) is surjective.
	Similarly, \( f^{(1)} \circ g_\star = (f \circ g)_\star \) is an isomorphism, so \( g_\star \) is injective.
\end{proof}
\begin{corollary}
	Let \( X \) be contractible.
	Then \( \pi_1(X,x_0) = 1 \) is the trivial group.
\end{corollary}
\begin{proof}
	The space \( \Omega(\qty{\bullet},\bullet) \) has one element, so \( \pi_1(\qty{\bullet},\bullet) = 1 \).
	Since \( X \sim \qty{\bullet} \), the result follows.
\end{proof}
